POV-Ray : Newsgroups : povray.general : Stupid question about normal tiles : Re: Stupid question about normal tiles Server Time
16 Nov 2024 09:22:18 EST (-0500)
  Re: Stupid question about normal tiles  
From: Chris Colefax
Date: 14 Sep 1998 00:31:41
Message: <35FC9190.B3CB80C1@geocities.com>
F.VERBAAS wrote:
> 
> I want to model a floor covered with tiles arranged in rows, like the
> checkered pattern, but with mortar seams like the brick pattern.
> Should be easy, but how do I do this?

If memory is the main concern, perhaps you could use a suitable
texture map, eg:

   #declare TilesSlope = slope_map {[0 <0, 0>] [.04 <.7, 2>] [.06 <1, 0>]}

   #declare TilesNormal = normal {average normal_map {
      [1 marble slope_map {TilesSlope}]
      [1 marble slope_map {TilesSlope} rotate y * 90]}
      }

   #declare Mortar = texture {
      pigment {granite color_map {[0 rgb .3] [1 rgb .5]} scale .5}
      normal {average normal_map {[1 granite -.5] [1 TilesNormal]}}
      }

   #declare Tiles = texture {
      pigment {wrinkles color_map {[.6 rgb 1] [1 rgb .8]} scale .5}
      normal {average normal_map {[1 bumps .1 scale 2] [1 TilesNormal]}}
      finish {reflection .6 specular .3 roughness .025}
      }

   plane {y, 0
      texture {marble texture_map {
         [.05 Mortar]
         [.05 marble texture_map {[.05 Mortar] [.05 Tiles]}
            rotate y * 90]}
         }
      }

   camera {location <1, 4, -2> look_at <0, 0, 0>}
   light_source {<-50, 150, -75> rgb 1.5}

I've used marble, rather than gradient, so the normals and pigments
automatically mirror themselves on both sides of the tiles.  Also, in
order to apply the TilesNormal to the entire mapped texture, I've
averaged it with the normals of each of the sub-textures.  Finally, if
the texture you choose for the Tiles wraps across adjacent tiles too
obviously, you might want to use two repeat warps (in the x and z
directions) with suitable offsets.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.